package com.joy.common;

import com.google.common.collect.ImmutableMap;

import java.util.Map;

public class JdbcMeta {
    public static Map<DBTYPE,String> DRIVER_NAME=new ImmutableMap.Builder<DBTYPE, String>()
                                                    .put(DBTYPE.MYSQL,"com.mysql.jdbc.Driver")
                                                    .put(DBTYPE.ORACLE,"oracle.jdbc.driver.OracleDriver")
                                                    .put(DBTYPE.MSSQL,"com.microsoft.sqlserver.jdbc.SQLServerDriver")
                                                    .put(DBTYPE.ADW,"oracle.jdbc.driver.OracleDriver")
                                                    .build();

    public static Map<DBTYPE,String> JDBCURL_TPL=new ImmutableMap.Builder<DBTYPE, String>()
                                                    .put(DBTYPE.MYSQL,"jdbc:mysql://%s:%s/%s")
                                                    .put(DBTYPE.ORACLE,"jdbc:oracle:thin:@//%s:%s/%s")
                                                    .put(DBTYPE.MSSQL,"jdbc:sqlserver://%s:%s;DatabaseName=%s")
                                                    .put(DBTYPE.ADW,"jdbc:oracle:thin:@%s")
                                                    .build();
}
